//
//  LineChart.h
//  LineChartDemo
//
//  Created by sunbin on 2017/3/3.
//  Copyright © 2017年 Quanli. All rights reserved.
//

#import <UIKit/UIKit.h>
// 线条类型
typedef NS_ENUM(NSInteger, LineChartType) {
    LineChartType_Straight, // 折线
    LineChartType_Curve     // 曲线
};
// 点类型
typedef NS_ENUM(NSInteger, PointType) {
    PointType_Rect,    // 方形
    PointType_Circel   // 圆形
};

@protocol LineChartDelegate <NSObject>


// x轴值
- (NSArray *)xValues;
// y轴值
- (NSArray *)yValues;



@end

@interface LineChart : UIView

@property (nonatomic ,weak) id<LineChartDelegate>delegate;


// 初始化折线图所在视图
+ (instancetype)lineChartViewWithFrame:(CGRect)frame;


// 绘制折线图
- (void)drawChartWithLineChartType:(LineChartType)lineType pointType:(PointType)pointType;

- (void)reloadData;


@end
